<?php
/**
 * Created by PhpStorm.
 * User: wangjinbao
 * Date: 17/11/20
 * Time: 下午3:27
 */
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class AuthToken
{
    public function handle($request, Closure $next)
    {
        if(Auth::check()){
            return $next($request);
        }else{
            abort(401);
        }
    }
}